import i18n from '@/lang'
// 系统公告通知列表表头,列带有special属性值为true时，说时需要单独处理单元中的值
export const sysAnnounceTbColumns = [{
  title: i18n.t('name'),
  dataIndex: 'name',
  width: 200,
  scopedSlots: {
    customRender: 'name'
  },
}, {
  title: i18n.t('announceType'),
  dataIndex: 'type',
  width: 160,
  scopedSlots: {
    customRender: 'type'
  },
  special: true,
},  {
  title: i18n.t('releaseChannel'),
  dataIndex: 'pushChannel',
  width: 260,
  scopedSlots: {
    customRender: 'pushChannel'
  },
},{
  title: i18n.t('user'),
  dataIndex: 'userNames',
  width: 200,
  scopedSlots: {
    customRender: 'userNames'
  },
},{
  title: i18n.t('role'),
  dataIndex: 'roleNames',
  width: 200,
  scopedSlots: {
    customRender: 'roleNames'
  },
},{
  title: i18n.t('status'),
  dataIndex: 'listStatus',
  width: 140,
  scopedSlots: {
    customRender: 'listStatus'
  },
}, {
  title: i18n.t('operation'),
  width: 320,
  fixed: 'right',
  key: 'operation',
  scopedSlots: { customRender: 'operation' }
}]

export const SelectedUserTbColumns = [
  {
    title: i18n.t('loginAccount'),
    dataIndex: 'account',
  }, 
  {
    title: i18n.t('userName'),
    dataIndex: 'name',
  }, 
  {
    title: i18n.t('org'),
    dataIndex: 'organizationId',
  }, 
]
export const pushChannelEnumArr = [
  { value: 1, name: i18n.t('弹窗') },
  { value: 2, name: i18n.t('站内信') },
  { value: 3, name: i18n.t('企业微信') },
  { value: 4, name: i18n.t('邮箱') }
]
export const announceTypeEnumArr = [
  { value: 1, name: i18n.t('普通公告') },
  { value: 2, name: i18n.t('版本升级') },
  { value: 3, name: i18n.t('升级维护') }
]
export const listStatusEnumArr = [
  { value: 1, name: i18n.t('新建') },
  { value: 2, name: i18n.t('测试中') },
  { value: 3, name: i18n.t('已发布') },
  { value: 4, name: i18n.t('已撤回') }
]